import { ABTestType, Audiocfg, OrderLayer, UIConf } from "../../framework/config/Appcfg";

/**所有界面的UID */

export enum UIID {
    Default = -1,
    UIHome = 0,
    UITop,
    UITips,
    UITouch,
    UILoad,
    UIGame,
    UIResurrect,
    UIOver,
    UISetting,
    UIRolue,
    UIExitGame,
    UICloudData,
    UIRank,
    UIPower,
    UIDayGit,
    UIGuide,
    PREFAB_RibbonEffect,
}
/**ui配置类 */
export let UICF: { [key: string]: UIConf } = {
    [UIID.UIHome]: { prefab: "ui/UIHome", name: "UIHome", showTop: false, showMult: false, zIndex: OrderLayer.main, bundleName: "prefabs" },
    [UIID.UITop]: { prefab: "ui/UITop", name: "UITop", showTop: false, showMult: false, zIndex: OrderLayer.top, bundleName: "prefabs" },
    [UIID.UITips]: { prefab: "ui/UITips", name: "UITips", showTop: false, showMult: true, zIndex: OrderLayer.tip, bundleName: "prefabs" },
    [UIID.UITouch]: { prefab: "ui/UITouch", name: "UITouch", showTop: false, zIndex: OrderLayer.touch, bundleName: "prefabs" },
    [UIID.UILoad]: { prefab: "ui/UILoad", name: "UILoad", showTop: false, showMult: false, zIndex: OrderLayer.Load, bundleName: "prefabs" },
    [UIID.UIGame]: { prefab: "ui/UIGame", name: "UIGame", showTop: false, showMult: false, zIndex: OrderLayer.game, bundleName: "prefabs" },
    [UIID.UIResurrect]: { prefab: "ui/UIResurrect", name: "UIResurrect", showTop: false, showMult: false, zIndex: OrderLayer.game, bundleName: "prefabs" },
    [UIID.UISetting]: { prefab: "ui/UISetting", name: "UISetting", showTop: false, showMult: false, zIndex: OrderLayer.game, bundleName: "prefabs" },
    [UIID.UIRolue]: { prefab: "ui/UIRolue", name: "UIRolue", showTop: false, showMult: false, zIndex: OrderLayer.game, bundleName: "prefabs" },
    [UIID.UIExitGame]: { prefab: "ui/UIExitGame", name: "UIExitGame", showTop: false, showMult: false, zIndex: OrderLayer.game, bundleName: "prefabs" },
    [UIID.UIOver]: { prefab: "ui/UIOver", name: "UIOver", showTop: false, showMult: false, zIndex: OrderLayer.game, bundleName: "prefabs" },
    [UIID.UIPower]: { prefab: "ui/UIPower", name: "UIPower", showTop: false, showMult: false, zIndex: OrderLayer.game, bundleName: "prefabs" },
    [UIID.UICloudData]: { prefab: "ui/UICloudData", name: "UICloudData", showTop: false, showMult: false, zIndex: OrderLayer.game, bundleName: "prefabs" },
    [UIID.UIDayGit]: { prefab: "ui/UIDayGit", name: "UIDayGit", showTop: false, showMult: false, zIndex: OrderLayer.game, bundleName: "prefabs" },
    [UIID.UIGuide]: { prefab: "ui/UIGuide", name: "UIGuide", showTop: false, showMult: false, zIndex: OrderLayer.guide, bundleName: "prefabs" },
    [UIID.UIRank]: { prefab: "ui/UIRank", name: "UIRank", showTop: false, showMult: false, zIndex: OrderLayer.game, bundleName: "prefabs" },

    [UIID.PREFAB_RibbonEffect]: { prefab: "effect/Ribbon/RibbonEffectLayer", name: "RibbonEffectLayer", showTop: false, showMult: false, zIndex: OrderLayer.game, bundleName: "prefabs" },

    

}

/**===========================声音资源============================= */
/**对应声音的名称路径 */

export enum AudioId {
    /**通用点击音效 */
    btnClick = "btnClick",
    /**主界面背景音乐 */
    mainBgm = "mainBgm",
    /**游戏背景音乐 */
    gameBgm = "gameBgm",

    /**奖励（签到，结算）  */
    reward = "reward",
    /**刷新技能 */
    refresh = "refresh",
    /**锤子技能音效 */
    knock = "knock",
    /**胜利音效 */
    victory = "victory",
    /**失败音效 */
    defeat = "defeate",
    /**连击音效1 */
    yes = "yes",
    /**连击音效2 */
    nice = "nice",
    /**连击音效3 */
    great = "great",
    /**连击音效4 */
    perfect = "perfect",
    /**连击音效5 */
    excellent = "excellent",
    /**连击音效6 */
    unbelievable = "unbelievable",

    /**消除 */
    clear = "clear",
    eat = "eat",

    /**升级 */
    levelUp = "levelUp",
    chapterEnd = 'chapter-end',
    starFall = 'star-fall',
}
export let AudioCF: { [key: string]: Audiocfg } = {
    [AudioId.btnClick]: { path: "btnClick", bundle: "audio" },
    [AudioId.mainBgm]: { path: "mainBgm", bundle: "audio" },
    [AudioId.gameBgm]: { path: "gameBgm", bundle: "audio" },
    [AudioId.reward]: { path: "reward", bundle: "audio" },
    [AudioId.refresh]: { path: "refresh", bundle: "audio" },
    [AudioId.knock]: { path: "knock", bundle: "audio" },
    [AudioId.victory]: { path: "victory", bundle: "audio" },
    [AudioId.defeat]: { path: "defeat", bundle: "audio" },
    [AudioId.yes]: { path: "yes", bundle: "audio" },
    [AudioId.nice]: { path: "nice", bundle: "audio" },
    [AudioId.great]: { path: "great", bundle: "audio" },
    [AudioId.perfect]: { path: "perfect", bundle: "audio" },
    [AudioId.excellent]: { path: "excellent", bundle: "audio" },
    [AudioId.unbelievable]: { path: "unbelievable", bundle: "audio" },
    [AudioId.clear]: { path: "clear", bundle: "audio" },
    [AudioId.eat]: { path: "eat", bundle: "audio" },
    [AudioId.levelUp]: { path: "levelUp", bundle: "audio" },
    [AudioId.chapterEnd]: { path: "chapter-end", bundle: "audio" },
    [AudioId.starFall]: { path: "star-fall", bundle: "audio" },
}
/**事件 */
export enum EventName {
    CLICK_COLOR_BLOCK = "click_color_block",
    UpdateHpTimer = "UpdateHpTimer",
    RefreshHP = "RefreshHP",
    /**无限体力状态 */
    UnlimitedHp = "UnlimitedHp",
}

export class GameConfig {

    public static readonly isGM: boolean = false;

    /**用来存缓存的key的前缀 每个游戏需要唯一*/
    public static readonly AppCacheName: string = "hxj_clearBlock:";
    /**切割段 |*/
    public static readonly splitCount: string = "|"
    /**切割数量 ; */
    public static readonly splitNum: string = ";"
    /**需要预先加载的bundle */
    public static PreBundle: string[] = [];
    /**数据是否需要加密 */
    public static ecrypt: boolean = false;
    //ab版本测试  默认无ab测试
    public static readonly abTestType: ABTestType = ABTestType.NO_AB

}
export class GameDataConfig {

}

export enum LayerGroup {
    DEFAULT = 0,
    Player = 2,
    GarbageCan = 4,
    GuideCircle = 8,

}

export enum RouteDir {
    NodeUp = "nodeUp",
    NodeDown = "nodeDown",
    NodeLeft = "nodeLeft",
    NodeRight = "nodeRight"
}